package com.w7vm.menuweb.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.Set;


/**
 * The persistent class for the UsuarioWeb database table.
 * 
 */
@Entity
@NamedQueries({
	@NamedQuery(name="Usuario.findUsuarioByIDUsuario", 
					query="SELECT u" +
					" FROM UsuarioWeb u" +
					" WHERE u.idUsuarioWeb = :idUsuario"),
})

public class UsuarioWeb implements Serializable {
	private static final long serialVersionUID = 1L;
	
	public static final String FIND_USUARIO_BY_CODUSUARIO = "Usuario.findUsuarioByIDUsuario";

	@Id 
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int idUsuarioWeb;

	@Column(name="CPF")
	private String cpf;

    @Temporal( TemporalType.DATE)
	@Column(name="DataInc")
	private Date dataInc;

	@Column(name="Mail")
	private String mail;

	@Column(name="Nome")
	private String nome;

	@Column(name="Password")
	private String password;

	@Column(name="Sobrenome")
	private String sobrenome;

	@Column(name="Status")
	private int status;

	@Column(name="Username")
	private String username;

	//bi-directional many-to-one association to AcessoWeb
	@OneToMany(mappedBy="usuarioWeb",cascade=CascadeType.ALL)
	private Set<AcessoWeb> acessoWebs;

	//bi-directional many-to-one association to ContratoWeb
   	@ManyToOne
	@JoinColumn(name="idContrato")
	private ContratoWeb contratoWeb;


    public UsuarioWeb() {
    }

	public int getIdUsuarioWeb() {
		return this.idUsuarioWeb;
	}

	public void setIdUsuarioWeb(int idUsuarioWeb) {
		this.idUsuarioWeb = idUsuarioWeb;
	}

	public String getCpf() {
		return this.cpf;
	}

	public void setCpf(String cpf) {
		this.cpf = cpf;
	}

	public Date getDataInc() {
		return this.dataInc;
	}

	public void setDataInc(Date dataInc) {
		this.dataInc = dataInc;
	}

	public String getMail() {
		return this.mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	public String getNome() {
		return this.nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getSobrenome() {
		return this.sobrenome;
	}

	public void setSobrenome(String sobrenome) {
		this.sobrenome = sobrenome;
	}

	public int getStatus() {
		return this.status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public Set<AcessoWeb> getAcessoWebs() {
		return this.acessoWebs;
	}

	public void setAcessoWebs(Set<AcessoWeb> acessoWebs) {
		this.acessoWebs = acessoWebs;
	}

	public ContratoWeb getContratoWeb() {
		return this.contratoWeb;
	}

	public void setContratoWeb(ContratoWeb contratoWeb) {
		this.contratoWeb = contratoWeb;
	}
	
}